<template>
  <div> pinia演示二 </div>
  <div>
    count:{{ count }}
    <el-button @click="increment">增加</el-button>
    <el-button @click="router.push('/study/pinia')">演示一</el-button>
  </div>
</template>
<script setup>
import { ref } from 'vue';

import { storeToRefs } from 'pinia';
import demoStore from '../../store/demo';
import { useRouter } from 'vue-router';
const router = useRouter();

const { count } = storeToRefs(demoStore());
const { increment } = demoStore();
</script>
<style scoped></style>
